package com.ciwong.epaper.modules.epaper.bean;

import com.ciwong.mobilelib.bean.BaseBean;
import com.google.gson.Gson;

import java.util.ArrayList;

/**
 * Created by lzr on 2017/4/25.
 */
public class SentenceAnswer extends BaseBean {
    private String workId;
    private String packageId;
    private String cId;
    private int moduleId;
    private String versionId;
    private String resourceName;
    private String parentVersionId;
    private String resourceType;
    private int workLong;
    private String doWorkPackageUrl;
    private float actualScore;
    private int brandId;
    private int workType;
    private int contentId;
    private float workScore;
    private String classId;
    private String userName;
    private ArrayList<WorkAnswers> workAnswers;
    private String avatorUrl;
    private String cover;
    private String videoUrl;
    private String dubbingVideoUrl;
    private long startTime;


    /**
     * UUID格式的唯一会话ID,同一次考试使用一个
     */
    private String sessionId;

    public SentenceAnswer() {

    }

    public void setSessionId(String sessionId) {
        this.sessionId = sessionId;
    }

    public String getSessionId() {
        return sessionId;
    }

    public SentenceAnswer(String workId, String packageId, String cId, int moduleId, String versionId, String resourceName,
                          String parentVersionId, String resourceType, int workLong, String doWorkPackageUrl, float actualScore,
                          int brandId, int workType, int contentId, float workScore, ArrayList<WorkAnswers> workAnswers) {
        this.workId = workId;
        this.packageId = packageId;
        this.cId = cId;
        this.moduleId = moduleId;
        this.versionId = versionId;
        this.resourceName = resourceName;
        this.parentVersionId = parentVersionId;
        this.resourceType = resourceType;
        this.workLong = workLong;
        this.doWorkPackageUrl = doWorkPackageUrl;
        this.actualScore = actualScore;
        this.brandId = brandId;
        this.workType = workType;
        this.contentId = contentId;
        this.workScore = workScore;
        this.workAnswers = workAnswers;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }

    public String getClassId() {
        return classId;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserName() {
        return userName;
    }

    public void setActualScore(float actualScore) {
        this.actualScore = actualScore;
    }

    public void setBrandId(int brandId) {
        this.brandId = brandId;
    }

    public void setcId(String cId) {
        this.cId = cId;
    }

    public void setContentId(int contentId) {
        this.contentId = contentId;
    }

    public void setDoWorkPackageUrl(String doWorkPackageUrl) {
        this.doWorkPackageUrl = doWorkPackageUrl;
    }

    public void setModuleId(int moduleId) {
        this.moduleId = moduleId;
    }

    public void setPackageId(String packageId) {
        this.packageId = packageId;
    }

    public void setParentVersionId(String parentVersionId) {
        this.parentVersionId = parentVersionId;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public void setVersionId(String versionId) {
        this.versionId = versionId;
    }

    public void setWorkAnswers(ArrayList<WorkAnswers> workAnswers) {
        this.workAnswers = workAnswers;
    }

    public void setWorkId(String workId) {
        this.workId = workId;
    }

    public void setWorkLong(int workLong) {
        this.workLong = workLong;
    }

    public void setWorkScore(float workScore) {
        this.workScore = workScore;
    }

    public void setWorkType(int workType) {
        this.workType = workType;
    }

    public ArrayList<WorkAnswers> getWorkAnswers() {
        return workAnswers;
    }

    public float getActualScore() {
        return actualScore;
    }

    public float getWorkScore() {
        return workScore;
    }

    public int getBrandId() {
        return brandId;
    }

    public int getContentId() {
        return contentId;
    }

    public int getModuleId() {
        return moduleId;
    }

    public int getWorkLong() {
        return workLong;
    }

    public int getWorkType() {
        return workType;
    }

    public String getcId() {
        return cId;
    }

    public String getDoWorkPackageUrl() {
        return doWorkPackageUrl;
    }

    public String getPackageId() {
        return packageId;
    }

    public String getParentVersionId() {
        return parentVersionId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public String getResourceType() {
        return resourceType;
    }

    public String getVersionId() {
        return versionId;
    }

    public String getWorkId() {
        return workId;
    }

    public String getAvatorUrl() {
        return avatorUrl;
    }

    public void setAvatorUrl(String avatorUrl) {
        this.avatorUrl = avatorUrl;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getDubbingVideoUrl() {
        return dubbingVideoUrl;
    }

    public void setDubbingVideoUrl(String dubbingVideoUrl) {
        this.dubbingVideoUrl = dubbingVideoUrl;
    }

    public static class WorkAnswers extends BaseBean {
        private String versionId;
        private float score;
        private int assess;
        private ArrayList<Answers> answers;

        public WorkAnswers() {

        }

        public WorkAnswers(String versionId, float score, int assess, ArrayList<Answers> answers) {
            this.versionId = versionId;
            this.score = score;
            this.assess = assess;
            this.answers = answers;
        }

        public void setVersionId(String versionId) {
            this.versionId = versionId;
        }

        public void setAnswers(ArrayList<Answers> answers) {
            this.answers = answers;
        }

        public void setAssess(int assess) {
            this.assess = assess;
        }

        public void setScore(float score) {
            this.score = score;
        }

        public String getVersionId() {
            return versionId;
        }

        public ArrayList<Answers> getAnswers() {
            return answers;
        }

        public float getScore() {
            return score;
        }

        public int getAssess() {
            return assess;
        }

    }

    public static class Answers extends BaseBean {
        private String word;
        private String audioUrl;
        private int readTimes;
        private int audioDuration;
        private String lines;
        /**
         * 云知声音频地址
         */
        private String yzsAudioUrl;
        private float fluency;
        private float integrity;
        private float pronunciation;


        public Answers() {

        }

        public Answers(String word, String audioUrl, int readTimes, int audioDuration, String lines,String yzsAudioUrl,float fluency,float integrity,float pronunciation) {
            this.word = word;
            this.audioUrl = audioUrl;
            this.readTimes = readTimes;
            this.audioDuration = audioDuration;
            this.lines = lines;
            this.yzsAudioUrl = yzsAudioUrl;
            this.fluency = fluency;
            this.integrity = integrity;
            this.pronunciation = pronunciation;
        }

        public float getFluency() {
            return fluency;
        }

        public void setFluency(float fluency) {
            this.fluency = fluency;
        }

        public float getIntegrity() {
            return integrity;
        }

        public void setIntegrity(float integrity) {
            this.integrity = integrity;
        }

        public float getPronunciation() {
            return pronunciation;
        }

        public void setPronunciation(float pronunciation) {
            this.pronunciation = pronunciation;
        }

        public void setAudioDuration(int audioDuration) {
            this.audioDuration = audioDuration;
        }

        public void setAudioUrl(String audioUrl) {
            this.audioUrl = audioUrl;
        }

        public void setReadTimes(int readTimes) {
            this.readTimes = readTimes;
        }

        public void setWord(String word) {
            this.word = word;
        }

        public int getAudioDuration() {
            return audioDuration;
        }

        public int getReadTimes() {
            return readTimes;
        }

        public String getAudioUrl() {
            return audioUrl;
        }

        public String getWord() {
            return word;
        }

        public String getLines() {
            return lines;
        }

        public void setLines(String lines) {
            this.lines = lines;
        }

        public String getYzsAudioUrl() {
            return yzsAudioUrl;
        }

        public void setYzsAudioUrl(String yzsAudioUrl) {
            this.yzsAudioUrl = yzsAudioUrl;
        }
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
